<?php 
namespace Home\Model;
use Think\Model;
class ExchangeModel extends Model{
protected $trueTableName='jiaohuan';
		public function jiaohuan($kind,$desc,$product,$area,$detail,$contract,$url,$user){
      if(empty($kind)||empty($desc)||empty($product)||empty($area)||empty($detail)||empty($contract)||empty($url)||empty($user)){
      	return 0;
      	//数据不全
      }else{
             $data['kind']=$kind;
             $data['desc']=$desc;
             $data['product']=$product;
             $data['area']=$area;
             $data['detail']=$detail;
             $data['contract']=$contract;
             $data['url']=$url;
             $data['user']=$user;
             $data['createtime']=time();
             $res=$this->add($data);
            if($res){
                  return 1;
            }else{
                  return 0;
            }
      }
	}
}


 ?>